package com.zsummer.design.structure.facade;

/**
 * 外观模式
 * @author zsummer
 *
 */
public class Client {
	public static void main(String[] args) {
		Face face = new Face();
		face.print();
		face.seal();
		face.approve();
	}
}

/**
 * 外观类
 * @author zsummer
 *
 */
class Face {
	private Print print = new Print();
	private Seal seal = new Seal();
	private Approve approve = new Approve();
	
	public void print() {
		print.function();
	}
	public void seal() {
		seal.function();
	}
	public void approve() {
		approve.function();
	}
}

class Print {
	public void function() {
		System.out.println("打印");
	}
}

class Seal {
	public void function() {
		System.out.println("盖章");
	}
}

class Approve {
	public void function() {
		System.out.println("审批");
	}
}